/*
 * Copyright 2009-2017 Alibaba Cloud All rights reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <alibabacloud/cs/model/DescribeUserQuotaResult.h>
#include <json/json.h>

using namespace AlibabaCloud::CS;
using namespace AlibabaCloud::CS::Model;

DescribeUserQuotaResult::DescribeUserQuotaResult() :
	ServiceResult()
{}

DescribeUserQuotaResult::DescribeUserQuotaResult(const std::string &payload) :
	ServiceResult()
{
	parse(payload);
}

DescribeUserQuotaResult::~DescribeUserQuotaResult()
{}

void DescribeUserQuotaResult::parse(const std::string &payload)
{
	Json::Reader reader;
	Json::Value value;
	reader.parse(payload, value);
	setRequestId(value["RequestId"].asString());
	if(!value["cluster_nodepool_quota"].isNull())
		cluster_nodepool_quota_ = std::stol(value["cluster_nodepool_quota"].asString());
	if(!value["amk_cluster_quota"].isNull())
		amk_cluster_quota_ = std::stol(value["amk_cluster_quota"].asString());
	if(!value["cluster_quota"].isNull())
		cluster_quota_ = std::stol(value["cluster_quota"].asString());
	if(!value["node_quota"].isNull())
		node_quota_ = std::stol(value["node_quota"].asString());
	if(!value["ask_cluster_quota"].isNull())
		ask_cluster_quota_ = std::stol(value["ask_cluster_quota"].asString());

}

long DescribeUserQuotaResult::getAmk_cluster_quota()const
{
	return amk_cluster_quota_;
}

long DescribeUserQuotaResult::getNode_quota()const
{
	return node_quota_;
}

long DescribeUserQuotaResult::getCluster_quota()const
{
	return cluster_quota_;
}

long DescribeUserQuotaResult::getAsk_cluster_quota()const
{
	return ask_cluster_quota_;
}

long DescribeUserQuotaResult::getCluster_nodepool_quota()const
{
	return cluster_nodepool_quota_;
}

